Skip to content

fix: [sc-19289] use stdlib crypto/sha3 so x/crypto bump can land - #13

Merged
devkoriel merged 1 commit into
mainfrom
sc-19289-keeman-stdlib-sha3
Aug 11, 2026
Merged

fix: [sc-19289] use stdlib crypto/sha3 so x/crypto bump can land#13
devkoriel merged 1 commit into
mainfrom
sc-19289-keeman-stdlib-sha3

Conversation

@devkoriel

Copy link
Copy Markdown
Contributor

Unblocks the Dependabot security PR keeman#11 (golang.org/x/crypto 0.41.0 to 0.52.0).

After #12 fixed the stale CI, #11 still failed on a single genuine finding:

pkg/tor/onion.go:91 [failure] inline: Call of sha3.Sum256 should be inlined (govet)

Cause: x/crypto 0.52.0 annotates its sha3 wrappers with a go:fix inline directive pointing at the standard library crypto/sha3 (added in Go 1.24), and golangci-lint v2 runs the govet inline analyser that enforces it. It did not fire on #12 because that PR did not carry the bump.

Change:

  • pkg/tor/onion.go imports crypto/sha3 from the standard library instead of golang.org/x/crypto/sha3. The call site is unchanged: both expose Sum256([]byte) [32]byte.
  • go.mod go directive 1.23.0 to 1.24.0, required because crypto/sha3 entered std in Go 1.24. The toolchain line already declares go1.24.6 and CI now runs 1.24.x, so this only makes the existing requirement explicit.

Worth noting: pkg/tor/onion.go was the ONLY direct consumer of golang.org/x/crypto in this repo, so after this change the module no longer imports it directly. Any remaining exposure is transitive, which #11 still covers by lifting the resolved version to 0.52.0.

Acceptance: this PR green, then #11 rebases green and merges, clearing 7 criticals in keeman.

Ref: [sc-19289]

@devkoriel devkoriel self-assigned this Aug 11, 2026
@devkoriel devkoriel added the bug Something isn't working label Aug 11, 2026
@devkoriel
devkoriel merged commit 8aca256 into main Aug 11, 2026
1 check passed
@devkoriel
devkoriel deleted the sc-19289-keeman-stdlib-sha3 branch August 11, 2026 12:55
@devkoriel

Copy link
Copy Markdown
Contributor Author

Merged with administrator privileges under the standing authorisation from Jinsoo Heo (2026-08-11), for the same reason recorded on #12: branch protection requires one approving review and GitHub forbids self-approval by the author. CI verified green before merge. Ref [sc-19289].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant